# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=tzdata
pkgver=2017b
pkgrel=1
pkgdesc="Sources for time zone and daylight saving time data"
arch=('any')
url="http://www.iana.org/time-zones"
license=('GPL')
options=('!emptydirs')
# new signing key is not available via public keyservers
source=(https://www.iana.org/time-zones/repository/releases/${pkgname}${pkgver}.tar.gz{,.asc})
sha512sums=('3e090dba1f52e4c63b4930b28f4bf38b56aabd6728f23094cb5801d10f4e464f17231f17b75b8866714bf98199c166ea840de0787b75b2274aa419a4e14bbc4d'
            'SKIP')
validpgpkeys=('7E3792A9D8ACF7D633BC1588ED97E90E62AA7E34') # Paul Eggert <eggert@cs.ucla.edu>

timezones=('africa' 'antarctica' 'asia' 'australasia'
           'europe' 'northamerica' 'southamerica'
           'pacificnew' 'etcetera' 'backward'
           'systemv' 'factory')

package() {
  cd ${srcdir}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
  
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
  install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab # zone.tab is depricated and will go soon
}
